<template>
  <div>
    <Header title="通讯录"/>
    <van-index-bar>
      <van-cell :title="item.fullName" v-for="item in usersList" :key="item.userId" :href="'tel:' + item.phone"><a>{{item.phone}}</a></van-cell>
<!--      <van-index-anchor index="G"/>-->
<!--      <van-cell title="高雪"><a href="tel:15916934811">15916934811</a></van-cell>-->
<!--      <van-cell title="高德"><a href="tel:15007140834">15007140834</a></van-cell>-->
<!--      <van-cell title="高明"><a href="tel:15007140833">15007140833</a></van-cell>-->
<!--      <van-cell title="耿精忠"><a href="tel:15007140832">15007140832</a></van-cell>-->
<!--      <van-index-anchor index="L"/>-->
<!--      <van-cell title="李坤"><a href="tel:13387602741">13387602741</a></van-cell>-->
<!--      <van-cell title="李乾"><a href="tel:15007140835">15007140835</a></van-cell>-->
<!--      <van-cell title="李世明"><a href="tel:15007140834">15007140834</a></van-cell>-->
<!--      <van-cell title="李渊"><a href="tel:15007140837">15007140837</a></van-cell>-->
<!--      <van-cell title="李农机"><a href="tel:15007140836">15007140836</a></van-cell>-->
<!--      <van-cell title="李光复"><a href="tel:15007140834">15007140834</a></van-cell>-->
<!--      <van-index-anchor index="X"/>-->
<!--      <van-cell title="熊君"><a href="tel:13995611201">13995611201</a></van-cell>-->
<!--      <van-cell title="熊甜"><a href="tel:13995611203">13995611203</a></van-cell>-->
<!--      <van-cell title="熊大"><a href="tel:13995611204">13995611204</a></van-cell>-->
<!--      <van-index-anchor index="W"/>-->
<!--      <van-cell title="王佳冰"><a href="tel:17764062646">17764062646</a></van-cell>-->
<!--      <van-cell title="王小二"><a href="tel:17764062641">17764062641</a></van-cell>-->
<!--      <van-cell title="王二傻"><a href="tel:17764062643">17764062643</a></van-cell>-->
    </van-index-bar>
  </div>
</template>

<script>
import Header from '../../../components/Header/Header'
import { getUserList } from '../../../api'

export default {
  name: 'CommitBook',
  data () {
    return {
      // 用户信息数组
      usersList: []
    }
  },
  created () {
    this.getUserListData()
  },
  components: {
    Header
  },
  methods: {
    // 获取通讯录用户列表
    async getUserListData () {
      const result = await getUserList()
      console.log(result)
      this.usersList = result.data
    }
  }
}
</script>

<style scoped>
  /deep/ .van-index-anchor {
    background-color: #ccc !important;
  }
</style>
